import {工作级别, 操作方式, 汽车尺寸, 起升部件} from "../../device/edit/起重";
import {加装附加装置, 开门方式, 控制方式, 缓冲器形式} from "../../device/edit/电梯";
import {加热方式s, 燃料种类, 燃烧方式, 锅炉结构形式} from "../../device/edit/锅炉";
import {动力方式} from "../../device/edit/厂车";
import {主结构形式, 保温形式, 安装形式, 罐车结构} from "../../device/edit/容器";



//选择框，  输出：正常的多选被选定的参数名[?未投入使用,,]。
/**配置关键参数变更的参数编辑器。
设备种类 EQP_TYPE{首1个字符},来过滤的；监察关键参数名映射配置；
升降机和起重共用。[参数叙述名字,后端字段,旧平台或监察字段名]
$约束：参数字段名称"svp.门跨度"是特殊，$其它字段名不可以以svp.开头的。
【特别注意】同一个Select<>列表组件也会要求value:name/desc的双向一一对应的，不能两个列表项取值是同一个值，产生歧义！要求取值一样的必须在字面name上进行合并处理！！
再考虑到设备种类是固定的，要求改成对每一种设备种类内部的关键参数typec.type{}的唯一性value:name辨别，@从value找出name必须唯一的。第一列映射唯一性第二列。
【关键参数类型区别】第四个列：0=文本,1=数字文本混合(带后缀单位)，2=纯数字(带后缀单位)，3=布尔值，4=日期，5=<Select的，6=<InputDatalist,7=<Select的Enum变换?，8=关联对象??
第四列：专门处理 11=“单位选择”<ChooseUnit  12=<AdminunitChoose  13=<DivisionChoose； 14=<VillageChoose  <GeoMapChoose;
第5个列：对于第四列是1或2的情况就是单位符号，第四列是=5-6的情况就是可选择列表项，第四列是=1-2的情况是后缀计量单位说明,其它类型的第5个列忽略；
json.参数取值编辑器还要自己定义心态变换？
原本TB_LIFT_PARA=8, TB_CRANE_PARA=25; 合体升降机种类之后type=“4”的参数项目有31个的。http://27.151.117.66:9922/fjsei/EqpMge/EqpKeyChg/req.jsp?t=getUpdateField&MENUID=37&TABLE_NAME=TB_CRANE_PARA
svp.xxx字段如何提取和？
[[],]第三个列配置参数主要是给后端的代码做归档比对的，在前端没用到。；
第四个第五个列配置是为优化编辑器输入可选择可适应日期关联ID；
第3列也有特殊的情况， "TC_FLOORNUM,升降机:FLOOR_NUM" ； 电梯["","","ELEFLOOR"]舍弃#3分解变量:特殊看监察实际处理？？,
type:?管道单元特别？
关键计数参数变更 http://27.151.117.66:9922/fjsei/EqpMge/EqpKeyChg/req.jsp?t=getUpdateField&MENUID=37&TABLE_NAME=TB_ELEV_PARA
@ TB_LIFT_PARA=8, TB_CRANE_PARA=25; 合体升降机种类。 TB_ELEV_PARA=21;TB_BOIL_PARA=6,TB_VEHIC_PARA=5,
 TB_AMUS_PARA=8;TB_GENERAL_VESSEL_PARA [0] TB_VESSEL_PARA=25;TB_PIPELINE_PARA=3,TB_PIPELINE_UNIT_PARA=[0],
 管道单元关键数据变更 针对“管道单元关键数据”
 可修订4个参数=：单元编号 长度 起始位置 终止位置；但是注册登记号不变的。这个场景“rno”类比EQP.cod做关键字;
 单元
容器的,["夹套（管程）设计温度","51","COVERDESIGNTEMPERATRUE",],改成["夹套设计温度"];
正常设备类型没配有的 "PU": 放这里PU代表是管道单元。 属于合并配置方式。
* */
export const 关键参数typec={
    "4":[
        ["工作级别（桥门/臂架）","jobl","WORKGRADE",6,工作级别],["提升高度","hlf","ELEHEIGHT",2,"米"],["起升高度（桥门/臂架）","hlfm","ELEHEIGHTMAIN",2,"m"],
        ["额定起重量（全部）","cap","MAXRATEDCARRYMASS",1,"吨"],["横向移动速度（停车设备）","lmv","LANMOVSPE",1,"m/min"],["小车速度（桥门:旋臂）","scv","S_CAR_V",1,"m/s"],
        ["额定速度","vls","RATEDSPEED,升降机:RATED_V",1,"m/min"],["运行速度（门座:塔:轻小型）","rvl","RUN_V",1,"m/s"],["停车设备高度","highs","TC_EQPHIGH",1,"米"],
        ["幅度（臂架）","rang","RANGE",1,"m"],["回转速度（臂架）","rtv","ROTATESVELOCITY",1,"度/s"],["停车适停汽车尺寸","pcs","TC_CARSIZE",6,汽车尺寸],
        ["层数","flo","TC_FLOORNUM,升降机:FLOOR_NUM",2,"层"],["大车速度（桥门）机臂运行速度（架桥）","cvl","L_CAR_V",1,"m/s"],
        ["起升速度（主勾）","mvl","LIFTESPEEDMAIN",2,"m"],["最大/额定起重力矩（臂架）","mom","CHAADVMOM",2,"吨米"],
        ["泊位数量（停车设备）","pnum","BERNUM",2,"个"],["变幅速度（臂架）","luff","ALTERRANGEVELOCITY",1,"m/s"],["单车最大进（出）时间","miot","TC_IO_MAXTIME",2,"秒"],
        ["变幅形式（门座:塔:流动）","luf","ALTERRANGEMODE",0],["操作方式（桥门）","opm","OPER_STYTLE",6,操作方式],["适停汽车质量","pcw","TC_CARWEIGHT",2,"kg"],
        ["跨度(m)","span","SPAN",2,"m"],["跨度（桥门）","svp.门跨度","SPAN_LEN",1,"m"],["起升机构部件（桥门:轻小型:旋臂）","part","UP_BODY",6,起升部件],
        ["站数","ns","STATION_NUM",2,"个"],["曳引机/电动葫芦型号","tm","DRAG_TYPE"],["额定载重","rtlf","RATED_LOAD",2,"吨"],
        ["曳引机/电动葫芦编号","tno","DRAG_COD"],["控制屏编号","cpi","CON_SCREEN_COD"],["控制屏型号","cpm","CON_SCREEN_TYPE"],
    ],
    "3":[
        ["层数","flo","ELEFLOORNUMBER",2,"层"],["站数","svp.电梯站数","getElestadenumber",2,"站"],["门数","svp.电梯门数","ELEDOORNUMBER",2,"个"],
        ["电动机型号","mtm","ELEC_TYPE",], ["额定速度","vl","RUNVELOCITY",2,"m/s"],
        ["轿厢意外移动保护装置型号","prot","CAR_PROTECT_TYPE",],["曳引机编号","svp.曳引号","TRACANGLEAFACNUMBER",],
        ["控制方式","opm","CONTROL_TYPE",5,控制方式],["上行超速保护装置型号","svp.上护型号","UP_PROTECT_TYPE",],
        ["是否加装附加装置","aap","IF_ADDDEVICE",6,加装附加装置],["电动机编号","svp.主机号","ELEC_COD",],["曳引机型号","tm","TRACANGTYPE",],
        ["控制屏型号","cpm","CONSCRTYPE",],["缓冲器形式","buff","BUFFER_MODE",5,缓冲器形式],
        ["人行道使用区段长度（自动人行道）","lesc","SLIDWAY_USE_LENG",2,"米"],["控制屏编号","svp.屏号","CONTSCRCODE",],
        ["提升高度","hlf","ELEHEIGHT",2,"米"],["名义宽度","wesc","NOMI_WIDTH",2,"mm"],
        ["额定载重","rtl","RATEDLOAD",2,"kg"],["开门方式","doop","DOOR_OPEN_TYPE",6,开门方式],["轿厢限速器型号","limm","RESTSPEEDTYPE",]
    ],
    "1":[
        ["额定蒸发量(T/H)","power","RATCON",2,"(T/H)"],["锅炉结构形式","form","MAINSTRFORM",6,锅炉结构形式],["额定工作压力(设计压力)","pres","DESWORKPRESS",2,"兆帕"],
        ["锅炉加热方式","svp.加热方式","HEATUPMODE",5,加热方式s],["锅炉燃料种类","fuel","BURNINGTYPE",6,燃料种类],["锅炉燃烧方式","bmod","BURNMODE",6,燃烧方式]
    ],
    "5":[
        ["额定载重","rtlf","RATEDLOADWEIG",2,"kg"],["动力方式","pow","DYNAMICMODE",5,动力方式],["发动机功率","svp.机功率","ENGINE_POWER",],
        ["发动机型号","mtm","ENGINEMODEL",],["厂车牌照","plat","CATLICENNUM",]
    ],
    "6":[
        ["运行高度","hlf","MOV_HIGH",2,"m"],["设备高度","high","HEIGHT",2,"m"],["额定速度","vl","RATEDVELOCITY",2,"m/s"],
        ["摆角","angl","SWINGANGLE",2,"度"],["额定乘客人数","pnum","RATEDPASSENGERNUM",2,"人"],["倾、夹角或坡度","grad","GRADE",2,"%"],
        ["回转直径","sdia","TURNINGDIAMETER",2,"m"],["长度","leng","LENGTH",2,"m"]
    ],
    "2":[
        ["容器高（长）","highs","CONTAINERHEIGHT",1,"mm"],["容积","vol","CONTAINERVOLUME",],["夹套设计温度","svp.夹设温","COVERDESIGNTEMPERATRUE",1,"℃"],
        ["罐体设计温度(℃)","svp.罐设温","TINDESITEMP",2,"℃"],["夹套（管程）设计压力","svp.夹设压","COVERDESIGNPRESS",1,"MPa"],
        ["罐体设计压力(MPa)","svp.罐设压","TINDESIPRESS",2,"MPa"],["载重量","rtlf","LOADWEIG",2,"kg"],["罐体容积","svp.罐容积","TINCUBAGE",1,"立方米"],
        ["罐体材料(外筒)","svp.罐材外","OUTJARMAT",],["壳程设计压力(MPa)","svp.壳设压","SHELLDESIGNPRESS",1,"MPa"],["安装形式","mont","INSFORM",5,安装形式],
        ["充装介质","mdi","TINAMPLMEDI",],["结构形式","svp.结构","MAINSTRFORM",6,主结构形式],["夹套（管程）工作介质","jakm","COVERMEDIUM",],
        ["罐体材料(内筒)","svp.罐材内","INNJARMAT",],["容器内径mm","svp.内径","CONINNDIA",1,"mm"],["内筒（壳程）（球罐）设计温度","svp.壳设温","SHELLDESIGNTEMPERATRUE",1,"℃"],
        ["罐车总重量","weig","TANKCARTOWEI",2,"kg"],["壳程介质","svp.壳介","SHELLMEDIUM",],["罐车牌号","plat","CARSIGN",],
        ["罐车结构型式","form","CARSTRFORM",6,罐车结构],["满载总重量","fulw","FULLYLOADWEI",2,"kg"],["保温(绝热形式)","insul","TEMPPREMODE",6,保温形式],
        ["管程设计温度(℃)","svp.管设温","TUBEDESIGNTEMPERATRUE",1,"℃"],["管程设计压力(MPa)","svp.管设压","TUBEDESIGNPRESS",2,"MPa"]
    ],
    "8":[
        ["设计温度","temp","DESIGN_TEMP",],["工作介质","mdi","WORK_MEDIUM",],["额定压力（设计）","prs","DESIGN_PRESS",],
    ],
    "PU":[
        ["单元编号","code","EQP_CODE",],["长度","leng","LENGTH",2,"m"],
        ["起始位置","start","START_PLACE",],["终止位置","stop","END_PLACE",]
    ],
    "R":[ ],
    "9":[ ]
} as any;


// export const 关键参数名s=[['NOTINUSE','?未投入使用'],['USE','在用'],['STOP','停用'],['DISCARD','报废'],['DEMOLISH','拆除'],['MOVEOUT','迁出'],
//     ['DELETE','垃圾数据'],['REMOVESUPV','删除(移除监察)'],['USENOTREG','在用未注册']];
// export const eqpInspKeyFiledMap = new Map();
// 关键参数名s.map(([enumt,desc],i) => (eqpInspKeyFiledMap.set(enumt, desc)) );
